package 强化训练;

import java.util.Scanner;

//******************已通过********
public class day33剪花布条 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String s = sc.next();
            String t = sc.next();
            int res = cut(s,t);
            System.out.println(res);
        }
    }
    private static int cut(String s,String t ){
        int index = s.indexOf(t);
        if (index == -1){
            return 0;
        }
        return 1 + cut(s.substring(index + t.length()),t);
    }
}
